//
//  ViewController.m
//  EXWYSCarDemo
//
//  Created by CHAMFENG on 2018/4/11.
//  Copyright © 2018年 CHAM. All rights reserved.
//

#import "ViewController.h"
#import "MyViewController.h"

@interface ViewController ()

/***/
@property (nonatomic ,strong) UIButton *btn;

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    _btn = [[UIButton alloc] initWithFrame:CGRectMake(90, 100, 160, 44)];
    _btn.backgroundColor = [UIColor grayColor];
    _btn.tintColor = [UIColor redColor];
    _btn.layer.cornerRadius = 8.0f;
    _btn.layer.masksToBounds = YES;
    [_btn setTitle:@"点击跳转" forState:UIControlStateNormal];
    [_btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:_btn];
    
   
}

- (void)btnClick
{
    // 创建控制器
    MyViewController *myVc = [[MyViewController alloc] init];
    
    [self.navigationController pushViewController:myVc animated:YES];
}
@end
